3.301 \(\int \frac{c+d x^n}{a+b x^n} \, dx\)

Optimal. Leaf size=42 \[ \frac{x (b c-a d) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{b x^n}{a}\right )}{a b}+\frac{d x}{b} \]

[Out]

(d*x)/b + ((b*c - a*d)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)])/(a*b)

________________________________________________________________________________________

Rubi [A]  time = 0.0159626, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118, Rules used = {388, 245} \[ \frac{x (b c-a d) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{b x^n}{a}\right )}{a b}+\frac{d x}{b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x^n)/(a + b*x^n),x]

[Out]

(d*x)/b + ((b*c - a*d)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)])/(a*b)

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{c+d x^n}{a+b x^n} \, dx &=\frac{d x}{b}-\frac{(-b c+a d) \int \frac{1}{a+b x^n} \, dx}{b}\\ &=\frac{d x}{b}+\frac{(b c-a d) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{b x^n}{a}\right )}{a b}\\ \end{align*}

Mathematica [A]  time = 0.0102025, size = 40, normalized size = 0.95 \[ \frac{x \left ((b c-a d) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{b x^n}{a}\right )+a d\right )}{a b} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^n)/(a + b*x^n),x]

[Out]

(x*(a*d + (b*c - a*d)*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)]))/(a*b)

________________________________________________________________________________________

Maple [F]  time = 0.416, size = 0, normalized size = 0. \begin{align*} \int{\frac{c+d{x}^{n}}{a+b{x}^{n}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*x^n)/(a+b*x^n),x)

[Out]

int((c+d*x^n)/(a+b*x^n),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\left (b c - a d\right )} \int \frac{1}{b^{2} x^{n} + a b}\,{d x} + \frac{d x}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^n)/(a+b*x^n),x, algorithm="maxima")

[Out]

(b*c - a*d)*integrate(1/(b^2*x^n + a*b), x) + d*x/b

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{d x^{n} + c}{b x^{n} + a}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^n)/(a+b*x^n),x, algorithm="fricas")

[Out]

integral((d*x^n + c)/(b*x^n + a), x)

________________________________________________________________________________________

Sympy [C]  time = 1.69671, size = 73, normalized size = 1.74 \begin{align*} - \frac{d x \Phi \left (\frac{a x^{- n} e^{i \pi }}{b}, 1, \frac{e^{i \pi }}{n}\right ) \Gamma \left (\frac{1}{n}\right )}{b n^{2} \Gamma \left (1 + \frac{1}{n}\right )} + \frac{c x \Phi \left (\frac{b x^{n} e^{i \pi }}{a}, 1, \frac{1}{n}\right ) \Gamma \left (\frac{1}{n}\right )}{a n^{2} \Gamma \left (1 + \frac{1}{n}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x**n)/(a+b*x**n),x)

[Out]

-d*x*lerchphi(a*x**(-n)*exp_polar(I*pi)/b, 1, exp_polar(I*pi)/n)*gamma(1/n)/(b*n**2*gamma(1 + 1/n)) + c*x*lerc
hphi(b*x**n*exp_polar(I*pi)/a, 1, 1/n)*gamma(1/n)/(a*n**2*gamma(1 + 1/n))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{d x^{n} + c}{b x^{n} + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^n)/(a+b*x^n),x, algorithm="giac")

[Out]

integrate((d*x^n + c)/(b*x^n + a), x)